package com.stlm2.dems.entity;

/**
 * 退款原因
 */
public enum RefundReason {

    NoWant(1) {
        public String toString() {
            return "我不想要了";
        }
    },
    Destory(2) {
        public String toString() {
            return "收到商品破损";
        }
    },
    MistakeOmission(3) {
        public String toString() {
            return "商品错发/漏发";
        }
    },
    RequiredRepairs(4) {
        public String toString() {
            return "商品需要维修";
        }
    },
    InvoicesProblem(5) {
        public String toString() {
            return "发票问题";
        }
    },
    NoMatchDescription(6) {
        public String toString() {
            return "收到商品与描述不符";
        }
    },
    Blemish(7) {
        public String toString() {
            return "做工瑕疵";
        }
    },
    QualityIssues(8) {
        public String toString() {
            return "商品质量问题";
        }
    },
    NoAgreedTime(9) {
        public String toString() {
            return "未按约定时间发货";
        }
    },
    FakeBrand(10) {
        public String toString() {
            return "假冒品牌";
        }
    },
    GoodsCompensation(11) {
        public String toString() {
            return "商品补偿";
        }
    };

    private final int val;

    RefundReason(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static RefundReason getByIntValue(int n) {
        switch (n) {
            case 1:
                return NoWant;
            case 2:
                return Destory;
            case 3:
                return MistakeOmission;
            case 4:
                return RequiredRepairs;
            case 5:
                return InvoicesProblem;
            case 6:
                return NoMatchDescription;
            case 7:
                return Blemish;
            case 8:
                return QualityIssues;
            case 9:
                return NoAgreedTime;
            case 10:
                return FakeBrand;
            case 11:
                return GoodsCompensation;
            default:
                return null;
        }
    }

}
